postfix notation
Học thuậtThân thiện
A student writes a mathematical expression in postfix notation on a whiteboard.
Definition
- Noun:
- A method of writing mathematical expressions without parentheses: "postfix notation" is a specific way to write mathematical or logical expressions where every operator (like +, -, ×) is placed after its operands (the numbers or variables it acts upon). This structure eliminates the need for parentheses to indicate the order of operations.
Usage
- Noun:
- The expression "3 4 +" in postfix notation is equivalent to "3 + 4" in standard notation.
- Many calculators use postfix notation because it is efficient for computer processing.
- To evaluate an expression in postfix notation, you read from left to right and apply operators to the most recent operands.
Advanced Usage
- "Reverse Polish Notation (RPN)": This is the most common synonym for . It is named after the Polish logician Jan Łukasiewicz.
- The Hewlett-Packard series of scientific calculators popularized the use of Reverse Polish Notation.
- Contrast with other notations: is one of three primary forms. It contrasts with:
- Infix notation: The standard form (e.g.,
A + B), where operators are placed between operands. - Prefix notation (or Polish notation): Where operators are placed before their operands (e.g.,
+ A B).
Variants and Related Words
- Postfix (adj/n): Pertaining to or being in . Sometimes used as a shorter form.
- A postfix expression is parsed unambiguously.
- RPN (n): A common abbreviation for Reverse Polish Notation, synonymous with .
- Enable RPN mode on your calculator for this calculation.
Synonyms
- Reverse Polish Notation (RPN): The full, most widely used synonym.
- Suffix notation: A less common technical synonym.
Related Concepts (Not Phrasal Verbs or Idioms)
- Stack (data structure): The primary data structure used to evaluate expressions in . Operands are pushed onto a stack, and operators pop operands from the stack, compute a result, and push it back.
- Evaluation of postfix notation relies heavily on a stack.
- Unambiguous parsing: A key property of ; the order of operations is inherently clear without parentheses or complex precedence rules.
- The advantage of postfix notation is its unambiguous parsing.
A student writes a mathematical expression in postfix notation on a whiteboard.
Noun
- a parenthesis-free notation for forming mathematical expressions in which each operator follows its operands